package com.mingtu.dzpatrol.fragment;

import android.view.View;

import com.mingtu.dzpatrol.R;
import com.mingtu.dzpatrol.activity.MonitoringModuleActivity;
import com.mingtu.dzpatrol.adapter.LotAdapter;
import com.mingtu.dzpatrol.base.BaseFragment;
import com.mingtu.dzpatrol.utils.IntentUtils;
import com.mingtu.dzpatrol.view.MultiGridView;

import butterknife.BindView;

public class Tab1Fragment extends BaseFragment {

    @BindView(R.id.grid_view)
    MultiGridView gridView;

    @Override
    protected int getLayoutId() {
        return R.layout.fragment_tab1;
    }

    @Override
    protected void initData() {

    }

    @Override
    protected void initView(View view) {
        LotAdapter lotAdapter = new LotAdapter(getContext());
        gridView.setAdapter(lotAdapter);
        lotAdapter.setOnItemClickListener(new LotAdapter.OnItemClickListener() {
            @Override
            public void onItemClick(View view, int position) {
//                if (position == 3) {
                IntentUtils.getInstance().readyGo(getActivity(), MonitoringModuleActivity.class);
//                } else {
//                    ToastUtils.showLong("功能完善中~");
//                }
            }
        });
    }

    @Override
    protected void getData() {

    }
}